package com.bls.service;

import com.bls.entity.Analyse;
import com.bls.entity.Draft;
import com.bls.entity.query.DraftQuery;
import com.bls.entity.vo.DraftVo;
import com.bls.exception.MyException;

import java.lang.reflect.InvocationTargetException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * (Draft)表服务接口
 *
 * @author makejava
 * @since 2022-01-10 18:42:44
 */
public interface DraftService {

    /**
     * 条件分页获取剧本草稿列表
     * @param draftQuery
     * @param pageSize
     * @param currentPage
     * @return
     */
    List<DraftVo> pageConditionDraftList(DraftQuery draftQuery, Integer pageSize, Integer currentPage) throws Exception;

    /**
     * 条件分页获取剧本草稿列表 的总数
     * @param draftQuery
     * @return
     */
    Integer pageConditionDraftTotal(DraftQuery draftQuery) throws Exception;

    /**
     * 添加剧本草稿
     * @param draft
     */
    void save(Draft draft) throws Exception;

    /**
     * 删除剧本草稿
     * @param draftId
     * @return
     */
    int deleteDraft(Long draftId) throws Exception;
    /**
     * 修改剧本草稿
     * @param draft
     * @return
     */
    int updateDraft(Draft draft) throws Exception;

    Draft selectDraftById(Long draftId) throws Exception;

    /*
    *  根据已开发的草稿剧本id获取对应的分析剧本
    * */
    Analyse selectAnalyseById(Long draftId) throws Exception;

    /**
     * 条件分页获取分析剧本运行状态列表
     * @param draftQuery
     * @param pageSize
     * @param currentPage
     * @return
     */
    List<DraftVo> pageConditionAnalyseRunningStatusList(DraftQuery draftQuery, Integer pageSize, Integer currentPage) throws Exception;

    /**
     * 条件分页获取分析剧本运行状态列表 的总数
     * @param draftQuery
     * @return
     */
    Integer pageConditionAnalyseRunningStatusTotal(DraftQuery draftQuery) throws Exception;
}